<?php
/**
 * huhaiqin,2024.10.12
 * 游戏模块后台页面控制器
 */
namespace Game\Controller;

class NoticeImageController extends \Common\Controller\AdminBaseController{
    /**
     * huhaiqin
     * 福利码管理
     */
    public function get_notice_image_list(){
        $res = M('GameNoticeImage')->order('id desc')->select();
        C('api_table',true); //标注是apitable的接口返回
        _apiReturn(1, 'success', ['data' => $res, 'page' => [
            'total' => count($res),
            'count' => count($res)
        ]]);
    }

    public function edit_notice_image(){
        D('GameNoticeImage')->_edit($_REQUEST);
    }

    public function game_notice_image_list(){
        $res = D('GameNoticeImage')->game_notice_image_list();
        if(!$res){
            _apiReturn(0, '获取失败');
            return;
        }
        _apiReturn(1, 'success', ['data' => $res]);
    }
}